package com.sdry.service.impl.permission;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sdry.entity.permission.UpmsStaff;
import com.sdry.mapper.permission.UpmsStaffMapper;
import com.sdry.service.permission.UpmsStaffService;

/**
 * UpmsStaffService实现
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class UpmsStaffServiceImpl implements UpmsStaffService {

	/**注入员工Mapper*/
    @Resource UpmsStaffMapper  upmsStaffMapper;
    /**
     * 根据主键拼接的字符串删除 员工返回影响行数
    */
    public Integer delete(String ids) {
        return upmsStaffMapper.delete(ids);
    }
    /**
     * 条件分页查询员工
    */
    public List<UpmsStaff> findPageByMution(UpmsStaff upmsStaff){
        return upmsStaffMapper.findPageByMution(upmsStaff);
    }
    /**
     * 插入返回员工id
    */
    public Long insert(UpmsStaff upmsStaff){
        return upmsStaffMapper.insert(upmsStaff);
    }
    /**
     * 条件查询员工
    */
    public List<UpmsStaff> queryAllByMution(UpmsStaff upmsStaff){
        return upmsStaffMapper.queryAllByMution(upmsStaff);
    }
    /**
     * 根据id查询员工
    */
    public UpmsStaff queryById(Long id){
        return upmsStaffMapper.queryById(id);
    }
    /**
     * 条件查询员工总条数
    */
    public Integer selectCountByMution(UpmsStaff upmsStaff){
        return upmsStaffMapper.selectCountByMution(upmsStaff);
    }
    /**
     * 根据主键更新 员工返回影响行数
    */
    public Integer update(UpmsStaff upmsStaff){
        return upmsStaffMapper.update(upmsStaff);
    }

}